using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Fields
{
    /// <summary>
    /// <para>Add Fields </para>
    /// <para>Adds new fields to a table, feature class, or raster.</para>
    /// <para>将新字段添加到表、要素类或栅格。</para>
    /// </summary>    
    [DisplayName("Add Fields ")]
    public class AddFields : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public AddFields()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_table">
        /// <para>Input Table</para>
        /// <para><xdoc>
        ///   <para>The input table where the fields will be added. The fields will be added to the existing input table and will not create a new output table.</para>
        ///   <para>Fields can be added to feature classes in geodatabases, shapefiles, coverages, stand-alone tables, raster catalogs, rasters with attribute tables, and layers.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将在其中添加字段的输入表。这些字段将添加到现有输入表中，并且不会创建新的输出表。</para>
        ///   <para>可以将字段添加到地理数据库、shapefile、coverage、独立表、栅格目录、带属性表的栅格和图层中的要素类。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_field_description">
        /// <para>Field Properties</para>
        /// <para><xdoc>
        ///   <para>The fields and their properties that will be added to the input table.</para>
        ///   <bulletList>
        ///     <bullet_item>Field Name—The name of the field that will be added to the input table.</bullet_item><para/>
        ///     <bullet_item>Field Type—The type of the new field.</bullet_item><para/>
        ///     <bullet_item>Field Alias—The alternate name given to the field name. This is used to give more descriptive names to cryptic field names. The Field Alias parameter only applies to geodatabases.</bullet_item><para/>
        ///     <bullet_item>Field Length—The length of the field being added. This sets the maximum number of allowable characters for each record of the field. This option is only applicable to fields of type text; the default length is 255.</bullet_item><para/>
        ///     <bullet_item>Default Value—The default value of the field.</bullet_item><para/>
        ///     <bullet_item>Field Domain—The geodatabase domain that will be assigned to the field.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>Available field types are as follows:</para>
        ///   <bulletList>
        ///     <bullet_item>TEXT—Any string of characters.</bullet_item><para/>
        ///     <bullet_item>FLOAT—Fractional numbers between -3.4E38 and 1.2E38.</bullet_item><para/>
        ///     <bullet_item>DOUBLE—Fractional numbers between -2.2E308 and 1.8E308.</bullet_item><para/>
        ///     <bullet_item>SHORT—Whole numbers between -32,768 and 32,767.</bullet_item><para/>
        ///     <bullet_item>LONG—Whole numbers between -2,147,483,648 and 2,147,483,647.</bullet_item><para/>
        ///     <bullet_item>DATE—Date and/or time.</bullet_item><para/>
        ///     <bullet_item>BLOB—Long sequence of binary numbers. You need a custom loader or viewer or a third-party application to load items into a BLOB field or view the contents of a BLOB field.</bullet_item><para/>
        ///     <bullet_item>RASTER—Raster images. All ArcGIS software-supported raster dataset formats can be stored, but it is recommended that you use small images only.</bullet_item><para/>
        ///     <bullet_item>GUID—Globally unique identifier.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将添加到输入表中的字段及其属性。</para>
        ///   <bulletList>
        ///     <bullet_item>字段名称 - 将添加到输入表中的字段的名称。</bullet_item><para/>
        ///     <bullet_item>字段类型 - 新字段的类型。</bullet_item><para/>
        ///     <bullet_item>字段别名 - 为字段名称指定的备用名称。这用于为神秘的字段名称提供更具描述性的名称。字段别名参数仅适用于地理数据库。</bullet_item><para/>
        ///     <bullet_item>字段长度 - 要添加的字段的长度。这将设置字段每条记录允许的最大字符数。此选项仅适用于文本类型的字段;默认长度为 255。</bullet_item><para/>
        ///     <bullet_item>默认值 - 字段的默认值。</bullet_item><para/>
        ///     <bullet_item>字段属性域 - 将分配给字段的地理数据库属性域。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>可用的字段类型如下：</para>
        ///   <bulletList>
        ///     <bullet_item>TEXT - 任意字符串。</bullet_item><para/>
        ///     <bullet_item>FLOAT - 介于 -3.4E38 和 1.2E38 之间的小数。</bullet_item><para/>
        ///     <bullet_item>DOUBLE - 介于 -2.2E308 和 1.8E308 之间的小数。</bullet_item><para/>
        ///     <bullet_item>SHORT - 介于 -32,768 和 32,767 之间的整数。</bullet_item><para/>
        ///     <bullet_item>LONG - 介于 -2,147,483,648 和 2,147,483,647 之间的整数。</bullet_item><para/>
        ///     <bullet_item>DATE - 日期和/或时间。</bullet_item><para/>
        ///     <bullet_item>BLOB - 二进制数的长序列。您需要自定义加载程序或查看器或第三方应用程序才能将项目加载到 BLOB 字段或查看 BLOB 字段的内容。</bullet_item><para/>
        ///     <bullet_item>栅格 （RASTER） - 栅格图像。可以存储所有 ArcGIS 软件支持的栅格数据集格式，但建议您仅使用小型影像。</bullet_item><para/>
        ///     <bullet_item>GUID - 全局唯一标识符。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public AddFields(object _in_table, object _field_description)
        {
            this._in_table = _in_table;
            this._field_description = _field_description;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Add Fields ";

        public override string CallName => "management.AddFields";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_table, _field_description, _out_table];

        /// <summary>
        /// <para>Input Table</para>
        /// <para><xdoc>
        ///   <para>The input table where the fields will be added. The fields will be added to the existing input table and will not create a new output table.</para>
        ///   <para>Fields can be added to feature classes in geodatabases, shapefiles, coverages, stand-alone tables, raster catalogs, rasters with attribute tables, and layers.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将在其中添加字段的输入表。这些字段将添加到现有输入表中，并且不会创建新的输出表。</para>
        ///   <para>可以将字段添加到地理数据库、shapefile、coverage、独立表、栅格目录、带属性表的栅格和图层中的要素类。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_table { get; set; }


        /// <summary>
        /// <para>Field Properties</para>
        /// <para><xdoc>
        ///   <para>The fields and their properties that will be added to the input table.</para>
        ///   <bulletList>
        ///     <bullet_item>Field Name—The name of the field that will be added to the input table.</bullet_item><para/>
        ///     <bullet_item>Field Type—The type of the new field.</bullet_item><para/>
        ///     <bullet_item>Field Alias—The alternate name given to the field name. This is used to give more descriptive names to cryptic field names. The Field Alias parameter only applies to geodatabases.</bullet_item><para/>
        ///     <bullet_item>Field Length—The length of the field being added. This sets the maximum number of allowable characters for each record of the field. This option is only applicable to fields of type text; the default length is 255.</bullet_item><para/>
        ///     <bullet_item>Default Value—The default value of the field.</bullet_item><para/>
        ///     <bullet_item>Field Domain—The geodatabase domain that will be assigned to the field.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>Available field types are as follows:</para>
        ///   <bulletList>
        ///     <bullet_item>TEXT—Any string of characters.</bullet_item><para/>
        ///     <bullet_item>FLOAT—Fractional numbers between -3.4E38 and 1.2E38.</bullet_item><para/>
        ///     <bullet_item>DOUBLE—Fractional numbers between -2.2E308 and 1.8E308.</bullet_item><para/>
        ///     <bullet_item>SHORT—Whole numbers between -32,768 and 32,767.</bullet_item><para/>
        ///     <bullet_item>LONG—Whole numbers between -2,147,483,648 and 2,147,483,647.</bullet_item><para/>
        ///     <bullet_item>DATE—Date and/or time.</bullet_item><para/>
        ///     <bullet_item>BLOB—Long sequence of binary numbers. You need a custom loader or viewer or a third-party application to load items into a BLOB field or view the contents of a BLOB field.</bullet_item><para/>
        ///     <bullet_item>RASTER—Raster images. All ArcGIS software-supported raster dataset formats can be stored, but it is recommended that you use small images only.</bullet_item><para/>
        ///     <bullet_item>GUID—Globally unique identifier.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将添加到输入表中的字段及其属性。</para>
        ///   <bulletList>
        ///     <bullet_item>字段名称 - 将添加到输入表中的字段的名称。</bullet_item><para/>
        ///     <bullet_item>字段类型 - 新字段的类型。</bullet_item><para/>
        ///     <bullet_item>字段别名 - 为字段名称指定的备用名称。这用于为神秘的字段名称提供更具描述性的名称。字段别名参数仅适用于地理数据库。</bullet_item><para/>
        ///     <bullet_item>字段长度 - 要添加的字段的长度。这将设置字段每条记录允许的最大字符数。此选项仅适用于文本类型的字段;默认长度为 255。</bullet_item><para/>
        ///     <bullet_item>默认值 - 字段的默认值。</bullet_item><para/>
        ///     <bullet_item>字段属性域 - 将分配给字段的地理数据库属性域。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>可用的字段类型如下：</para>
        ///   <bulletList>
        ///     <bullet_item>TEXT - 任意字符串。</bullet_item><para/>
        ///     <bullet_item>FLOAT - 介于 -3.4E38 和 1.2E38 之间的小数。</bullet_item><para/>
        ///     <bullet_item>DOUBLE - 介于 -2.2E308 和 1.8E308 之间的小数。</bullet_item><para/>
        ///     <bullet_item>SHORT - 介于 -32,768 和 32,767 之间的整数。</bullet_item><para/>
        ///     <bullet_item>LONG - 介于 -2,147,483,648 和 2,147,483,647 之间的整数。</bullet_item><para/>
        ///     <bullet_item>DATE - 日期和/或时间。</bullet_item><para/>
        ///     <bullet_item>BLOB - 二进制数的长序列。您需要自定义加载程序或查看器或第三方应用程序才能将项目加载到 BLOB 字段或查看 BLOB 字段的内容。</bullet_item><para/>
        ///     <bullet_item>栅格 （RASTER） - 栅格图像。可以存储所有 ArcGIS 软件支持的栅格数据集格式，但建议您仅使用小型影像。</bullet_item><para/>
        ///     <bullet_item>GUID - 全局唯一标识符。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Field Properties")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _field_description { get; set; }


        /// <summary>
        /// <para>Updated Input Table</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Input Table")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_table { get; set; }


        public AddFields SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}